package uml.structural.adapter;

/**
 * 适配器（包装器）--适配器<br>
 * on 2022/12/23 0:42
 */
public class PoliceCarAdapter extends CarController {
    private PoliceLamp lamp;
    private PoliceSound sound;

    public PoliceCarAdapter() {
        lamp = new PoliceLamp();
        sound = new PoliceSound();
    }

    @Override
    public void lamp() {
        lamp.lightFlash();
    }

    @Override
    public void twinkle() {
        sound.lamp();
    }
}
